package cn.qiyu5522.tk_ems.entity;

import com.baomidou.mybatisplus.annotation.*;

import java.time.LocalDateTime;
import java.io.Serializable;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

/**
 * <p>
 * 
 * </p>
 *
 * @author Tonkey
 * @since 2023-02-07
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("t_classroom")
@ApiModel(value="Classroom对象", description="")
@JsonIgnoreProperties({ "operatorId", "operator","deleted"})
public class Classroom implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "班级编号")
    @TableId("id")
    @NotNull(message = "班级编号不能为空")
    private Long id;

    @ApiModelProperty(value = "班级名称")
    @NotBlank(message = "班级名称不能为空")
    @TableField("name")
    private String name;

    @ApiModelProperty(value = "专业编号")
    @TableField("major_id")
    @NotNull(message = "专业编号不能为空")
    private Long majorId;

    @ApiModelProperty(value = "院系编号")
    @TableField("department_id")
    @NotNull(message = "院系编号不能为空")
    private Long departmentId;

    @ApiModelProperty(value = "创建时间")
    @TableField(value = "create_time", fill = FieldFill.INSERT)
    private LocalDateTime createTime;

    @ApiModelProperty(value = "更新时间")
    @TableField(value = "update_time", fill = FieldFill.INSERT_UPDATE)
    private LocalDateTime updateTime;

    @ApiModelProperty(value = "操作员编号")
    @TableField(value = "operator_id", fill = FieldFill.INSERT_UPDATE)
    private Long operatorId;

    @ApiModelProperty(value = "逻辑删除（0删1不删）")
    @TableField(value = "is_deleted",fill = FieldFill.INSERT)
    @TableLogic
    private Integer deleted;


}
